1. Field of the Invention
The present invention relates to a method for simplifying a process of obtaining the related information of neighboring partitions of the video image during a coding and decoding process, and more particularly to a method for simplifying a process of obtaining the related information of neighboring partitions of the video image by using a matrix data structure.
2. Description of the Related Art
Traditional motion picture expert group (MPEG) video image compression technology uses a macro-block as a unit in the coding and decoding process. In a new technology, such as advanced video coding (AVC) technology and H. 264 technology, a partition divided from the macro-block can serve as a unit. A video image can be divided into macro-blocks. The basic unit of a macro-block is a sub-block. A partition is an assembly of any number of sub-blocks. FIG. 1 is a configuration showing the relationship between a macro-block 101 and sub-blocks 102. In FIG. 1, the macro-block 101 comprises 16 sub-blocks. FIG. 2 is a configuration showing an example of dividing macro-block 101. The macro-block 101 in FIG. 2 is divided into 5 partitions. Wherein, the partition 110 comprises 8 sub-blocks, the partition 111 comprises 4 sub-blocks, the partition 112 comprises 2 sub-blocks, and each of the partitions 113 and 114 comprises only one sub-block.
During the coding and decoding process for the partitions, the related information of the neighboring partitions may be used. The related information comprises, for example, a non-zero coefficient, an intra predict mode, a reference frame index, a motion vector, and so on. Each macro-block is divided in a different manner so that a complicated data structure is required to describe all possible structures. Accordingly, in the traditional method, various determinations need to be performed in such complicated data structure. For example, in FIG. 2, the partition 110 is adjacent to the left of the partition 114, the partition 113 is adjacent to the top of the partition 114, and the partition 112 is adjacent to the top-right of the partition 114. These partitions have different sizes and shapes. Also, the relative locations of the partitions and the macro-blocks containing these partitions are also different. For locating the partition in other macro-blocks, such as the partition adjacent to the top-right of the partition 112, the procedure will be more complicated. Accordingly, the determination process of the traditional method is complicated, and thus the execution efficiency declines and the programming is difficult.
Accordingly, a method to resolve the issues describe above is desired.